package org.example.patternOfFactoryMethod;

/**
 * @auther hewenhui
 * @see <a href="hetp://www.codingmaster.com> java </a>
 */

import org.example.patternOfFactoryMethod.Factorys.FighterFactory;
import org.example.patternOfFactoryMethod.Factorys.GunFactory;
import org.example.patternOfFactoryMethod.Factorys.WeaponFactory;
import org.example.patternOfFactoryMethod.Weapons.Weapon;

/**
 * @author 动力节点
 * @version 1.0
 * @className Client
 * @since 1.0
 **/
public class Client {
    public static void main(String[] args) {
        WeaponFactory factory = new GunFactory();
        Weapon weapon = factory.get();
        weapon.attack();

        WeaponFactory factory1 = new FighterFactory();
        Weapon weapon1 = factory1.get();
        weapon1.attack();
    }
}
